package com.chinasoft.goodsManager.dao;

import com.chinasoft.goodsManager.domain.Goods;
import com.chinasoft.goodsManager.domain.Manager;

import java.util.List;
import java.util.Map;
import java.util.Set;

public interface LoginDao {
    //初始化
    List<Map<String, Object>> findMUserName();

    List<Map<String, Object>> findMEmail();

    void setRedisName(String musername);

    void setRedisEmail(String memail);
    //redis查询用户名
    Set<String> findMUserNameByName();
    //redis查询邮箱
    Set<String> findMEmailByEmail();

    void addNewManager(String musername, String memail, String mpassword);

    Manager findMUserNameAndPassword(String musername, String mpassword);

    Manager findEmailAndPassword(String memail, String mpassword);

    Manager updateManagerInformation(Manager manager);

    Manager updateManagerImg(String filename, Integer id);

    Goods findGoodsById(Integer id);

    void addGoods(Goods goods);

    void updateGoods(Goods goods);
}
